package com.voice.client.api;

import lombok.Data;

import java.io.File;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Data
public class VoiceApiRequest<T> {

    private Map<String, List<String>> header=new HashMap<>();

    private Map<String, T> params = new HashMap();

    private Map<String, File> files=new HashMap<>();

    public void setToken(String token) {
        this.header.put("token", Arrays.asList(token));
    }

    public void putHeader(String key, List<String> value) {
        this.header.put(key, value);
    }

    public void putParam(String key, T value) {
        this.params.put(key, value);
    }

    public void putFile(String key, File value) {
        this.files.put(key, value);
    }
}
